#include "bugs.h"
#include "bugThread.h"
#include <QApplication>

Bugs::Bugs(QWidget *parent, Qt::WindowFlags flags)
	: QMainWindow(parent, flags)
{
	ui.setupUi(this);
	BugThread* bt = new BugThread(this);
	connect(bt, SIGNAL(sigBugsignal()), this, SLOT(onBugSlot()));
	bt->start();
}

Bugs::~Bugs()
{
 
}

void Bugs::onBugSlot()
{
    // no sleep 1 sec, stack overflow will be caused.
	//QThread::sleep(1.0); 
	QApplication::processEvents();
}